Skip to content

fix(specifiers): correct Trance Disorder possession structure (ICD-11 6B62/6B63)#695

Merged
BigSimmo merged 1 commit into
mainfrom
claude/specifiers-v2-design-r55baf
Jul 17, 2026
Merged

fix(specifiers): correct Trance Disorder possession structure (ICD-11 6B62/6B63)#695
BigSimmo merged 1 commit into
mainfrom
claude/specifiers-v2-design-r55baf

Conversation

@BigSimmo

@BigSimmo BigSimmo commented Jul 17, 2026

Copy link
Copy Markdown
Owner

Summary

Implements the actionable structural item from #693. The source-verification pass found the specifier catalogue modelled Trance Disorder with a "with/without possession" specifier, which misrepresents ICD-11: possession is not a qualifier of a single disorder — ICD-11 uses two separate diagnoses, 6B62 Trance disorder (dissociative state without a replacing identity) and 6B63 Possession trance disorder (identity replaced by an external identity/spirit/power).

This reframes the possession item on both Trance Disorder nodes (the Dissociative Disorders category and the ICD-11 Specifics category) so its label and icd11Context state the two distinct ICD-11 diagnoses instead of a with/without qualifier:

Item counts are unchanged, so the stats block and index↔content sync are untouched (still 585 items, 0 displayed definitions).

Intentionally NOT changed: the parallel Dissociative Identity Disorder "with/without possession form" — that one is correct, because ICD-11 6B64 genuinely encompasses both possession and non-possession forms within a single diagnosis. The verification pass confirmed the contradiction is specific to Trance Disorder.

Verification

  • JSON valid; Prettier clean; index in sync (585 items, 0 generated definitions).

  • Vitest: tests/specifiers-content.test.ts + tests/specifiers.test.ts28/28 pass. The possession regression test now asserts the corrected framing (DID covers both forms; Trance points to the separate 6B63 diagnosis).

  • npm run verify:pr-local

  • npm run verify:ui — a specifier label/context changed

Clinical Governance Preflight

  • Source-backed claims require linked verification — this corrects a source misrepresentation against WHO ICD-11 (6B62/6B63); no generated definition text is displayed (withheld since fix(specifiers): withhold all generated definitions pending clinician review #691).
  • No patient-identifiable document workflow introduced or expanded.
  • Supabase target unchanged (Clinical KB Database / sjrfecxgysukkwxsowpy).
  • Service-role keys and private document access remain server-only.
  • Demo/synthetic content remains separate.
  • Source metadata / review status remains conservative — the row still carries pending-review status; only its label/context are corrected.
  • Deployment classification / TGA SaMD — a corrective clarification of ICD-11 structure; low risk, but a reviewer may confirm.

Notes

Relates to #693. Follows #656, #691.

🤖 Generated with Claude Code


Generated by Claude Code

Summary by CodeRabbit

  • Bug Fixes
    • Corrected ICD-11 information for possession trance, distinguishing Trance Disorder (6B62) from Possession Trance Disorder (6B63).
    • Updated labels and explanations to direct users to the appropriate diagnosis rather than using a “with/without possession” qualifier.
    • Improved related search results for clearer, more accurate terminology.

Source verification (issue #693) found the catalogue modelled Trance
Disorder with a "with/without possession" specifier, which misrepresents
ICD-11: possession is not a qualifier of one disorder but a SEPARATE
diagnosis — 6B62 Trance disorder (no replacing identity) vs 6B63 Possession
trance disorder.

Reframe the possession item on both Trance Disorder nodes (Dissociative
Disorders + ICD-11 Specifics categories) so its label and context state the
two distinct ICD-11 diagnoses instead of a with/without specifier, and
update icd11Context accordingly. Item counts are unchanged, so stats stay
consistent. The parallel Dissociative Identity Disorder "with/without
possession form" is intentionally left as-is — ICD-11 6B64 genuinely covers
both forms within one diagnosis.

Update the possession regression test to assert the corrected framing (DID
covers both forms; Trance points to the separate 6B63 diagnosis).

Relates to #693.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WmtoUEnX7Pe4yipAmPFSiG
@supabase

supabase Bot commented Jul 17, 2026

Copy link
Copy Markdown

This pull request has been ignored for the connected project sjrfecxgysukkwxsowpy because there are no changes detected in supabase directory. You can change this behaviour in Project Integrations Settings ↗︎.


Preview Branches by Supabase.
Learn more about Supabase Branching ↗︎.

@coderabbitai

coderabbitai Bot commented Jul 17, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 006265a9-5ced-419d-bb27-30b40cb37edc

📥 Commits

Reviewing files that changed from the base of the PR and between b1829b7 and df78040.

📒 Files selected for processing (3)
  • data/specifiers-content.json
  • data/specifiers-search-index.json
  • tests/specifiers-content.test.ts

📝 Walkthrough

Walkthrough

Updated Trance Disorder ICD-11 content and search labels to distinguish trance disorder (6B62) from possession trance disorder (6B63), and revised tests to validate separate diagnosis wording while preserving Dissociative Identity Disorder possession coverage.

Changes

Trance Disorder ICD-11 Coding

Layer / File(s) Summary
Correct ICD-11 content
data/specifiers-content.json
Trance Disorder entries now identify possession trance as separate diagnosis 6B63 rather than a possession specifier and distinguish it from 6B62.
Synchronize labels and tests
data/specifiers-search-index.json, tests/specifiers-content.test.ts
Search labels use the separate-diagnosis wording, and tests validate distinct DID possession behavior alongside Trance Disorder 6B62/6B63 wording.

Estimated code review effort: 2 (Simple) | ~10 minutes

Possibly related issues

Possibly related PRs

Suggested reviewers: claude

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title is concise and accurately summarizes the Trance Disorder ICD-11 structure correction.
Description check ✅ Passed The description follows the required template and includes summary, verification, governance preflight, and notes.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch claude/specifiers-v2-design-r55baf

Comment @coderabbitai help to get the list of available commands.

@BigSimmo
BigSimmo marked this pull request as ready for review July 17, 2026 04:49
@BigSimmo
BigSimmo merged commit cb544a4 into main Jul 17, 2026
16 checks passed
@BigSimmo
BigSimmo deleted the claude/specifiers-v2-design-r55baf branch July 17, 2026 06:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants